define(function(require,exports,module){
	var Grid=require("grid-1.0.0");
	var columns=[{
		key:"address",
		name:"位置"
	},{
		key:"carDate",
		name:"时间",
		format :"date",
	    formatparams:{
		  mode:"YYYY-MM-DD HH:mm:SS"
	    }
	},{
		key:"driverName",
		name:"司机"
	},{
		key:"driverPhone",
		name:"司机电话"
	}];
	
	var SC_service={
		init:function(widget,params){
			return new Grid({
				parentNode:".J-member-service",
				url:"api/shiftchange/querycar",
				params:function(){
					return {
						createDate:params.startdate,
						createEndDate:params.enddate,
						fetchProperties:"*"
					};
				},
				model:{
					head:{
						title:"派车"
					},
					columns:columns
				}
			});
		},
		initPrint:function(widget,params){
			return new Grid({
				autoRender:false,
				isInitPageBar:false,
				parentNode:".J-member-service-print",
				model:{
					head:{
						title:"派车"
					},
					columns:columns
				}
			});
		}
	};
	
	module.exports=SC_service;
});